package service;

import model.data.Stock;
import model.data.Storehouse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import dao.StockDao;
import dao.support.sql.SqlObject;

@Component
public class StockService {
	@Autowired StockDao sd;
	public void stock_addTx(Stock stock)
	{
		sd.stock_add(stock);
	}
	public void stock_deleteTx(String stock_id)
	{
		sd.stock_delete(stock_id);
	}
	public void stock_updateTx(Stock stock)
	{
		sd.stock_update(stock);
	}
	public String stock_queryTx(SqlObject so)
	{
		return sd.stock_query(so);
	}
	public Storehouse storehouse_foundbyidTx(String storehouse_id)
	{
		return sd.storehouse_foundbyid(storehouse_id);
	}
	public Stock stock_foundbyidTx(String stock_id)
	{
		return sd.stock_foundbyid(stock_id);
	}
}
